package com.zzy.chapter4.transaction.colleague;

import com.zzy.chapter4.transaction.mediator.AbstractMediator;
import lombok.Getter;

public abstract class AbstractCustomer {
    public AbstractMediator mediator;

    public String orderId;

    @Getter
    public String customerName;

    AbstractCustomer(String orderId, String customerName, AbstractMediator mediator) {
        this.orderId = orderId;
        this.customerName = customerName;
        this.mediator = mediator;
    }

    // 定义与中介者的信息交互方法
    public abstract void messageTransfer(String orderId, String targetCustomer, String payResult);

}
